import React, { useState, createContext, useContext } from "react";
import styles from './index.module.css';
// import Logo from '../logo';
// import { Input, Dropdown, Menu, Avatar, Badge } from 'antd';
// import { CaretDownOutlined, BellOutlined, BulbOutlined, PlusOutlined } from '@ant-design/icons';
import Link from 'next/link'
import { UserContext } from '../../pages/_app'

const DashboardSidebar: React.FC = () => {
  const { name, age } = useContext(UserContext);
  return (
    <div className={styles.container}>
      <Link href={`/${name}`}>
        <div>个人主页{name} {age}</div>
      </Link>
      <Link href={`/${name}/dashboard/projects`}>
        <div>仓库</div>
      </Link>
      <Link href={`/${name}/dashboard/pull_requests`}>
        <div>Pull Requests</div>
      </Link>
      <Link href={`/${name}/dashboard/issues`}>
        <div>Issues</div>
      </Link>
      <Link href={`/${name}/dashboard/codes`}>
        <div>代码片段</div>
      </Link>
      <Link href={`/${name}/starred`}>
        <div>我的星选集</div>
      </Link>
      <Link href={{
              pathname: '/posts/[id]',
              query: { id: '1' },
            }}>
        <div>posts/1</div>
      </Link>
      <Link href='/posts/2'>
        <div>posts/2</div>
      </Link>
    </div>
  )
}

export default DashboardSidebar;